<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The SolrCollapseFunction class</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="solrdismaxquery.useedismaxqueryparser.html">« SolrDisMaxQuery::useEDisMaxQueryParser</a></li>
      <li style="float: right;"><a href="solrcollapsefunction.construct.html">SolrCollapseFunction::__construct »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.solr.html">Solr</a></li>
    <li>The SolrCollapseFunction class</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.solrcollapsefunction" class="reference">

 <h1 class="title">The SolrCollapseFunction class</h1>
 

 <div class="partintro"><p class="verinfo">(PECL solr &gt;= 2.2.0)</p>


  <div class="section" id="solrcollapsefunction.intro">
   <h2 class="title">简介</h2>
   <p class="para">

   </p>
  </div>


  <div class="section" id="solrcollapsefunction.synopsis">
   <h2 class="title">类摘要</h2>


   <div class="classsynopsis">
    <div class="ooclass"></div>


    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">SolrCollapseFunction</strong>
     </span>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* Constants */</div>
    <div class="fieldsynopsis">
     <span class="modifier">const</span>
     <span class="type">string</span>
      <var class="fieldsynopsis_varname"><a href="class.solrcollapsefunction.html#solrcollapsefunction.constants.nullpolicy-ignore"><var class="varname">NULLPOLICY_IGNORE</var></a></var><span class="initializer"> = ignore</span>;</div>

    <div class="fieldsynopsis"><span class="modifier">const</span>
     <span class="type">string</span>
      <var class="fieldsynopsis_varname"><a href="class.solrcollapsefunction.html#solrcollapsefunction.constants.nullpolicy-expand"><var class="varname">NULLPOLICY_EXPAND</var></a></var><span class="initializer"> = expand</span>;</div>

    <div class="fieldsynopsis"><span class="modifier">const</span>
     <span class="type">string</span>
      <var class="fieldsynopsis_varname"><a href="class.solrcollapsefunction.html#solrcollapsefunction.constants.nullpolicy-collapse"><var class="varname">NULLPOLICY_COLLAPSE</var></a></var><span class="initializer"> = collapse</span>;</div>

    
    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="constructorsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="solrcollapsefunction.construct.html" class="methodname">__construct</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$field</code><span class="initializer"> = ?</span></span>)</div>

    <div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrcollapsefunction.getfield.html" class="methodname">getField</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrcollapsefunction.gethint.html" class="methodname">getHint</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrcollapsefunction.getmax.html" class="methodname">getMax</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrcollapsefunction.getmin.html" class="methodname">getMin</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrcollapsefunction.getnullpolicy.html" class="methodname">getNullPolicy</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrcollapsefunction.getsize.html" class="methodname">getSize</a></span>(): <span class="type">int</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrcollapsefunction.setfield.html" class="methodname">setField</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$fieldName</code></span>): <span class="type"><a href="class.solrcollapsefunction.html" class="type SolrCollapseFunction">SolrCollapseFunction</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrcollapsefunction.sethint.html" class="methodname">setHint</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$hint</code></span>): <span class="type"><a href="class.solrcollapsefunction.html" class="type SolrCollapseFunction">SolrCollapseFunction</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrcollapsefunction.setmax.html" class="methodname">setMax</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$max</code></span>): <span class="type"><a href="class.solrcollapsefunction.html" class="type SolrCollapseFunction">SolrCollapseFunction</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrcollapsefunction.setmin.html" class="methodname">setMin</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$min</code></span>): <span class="type"><a href="class.solrcollapsefunction.html" class="type SolrCollapseFunction">SolrCollapseFunction</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrcollapsefunction.setnullpolicy.html" class="methodname">setNullPolicy</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$nullPolicy</code></span>): <span class="type"><a href="class.solrcollapsefunction.html" class="type SolrCollapseFunction">SolrCollapseFunction</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrcollapsefunction.setsize.html" class="methodname">setSize</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$size</code></span>): <span class="type"><a href="class.solrcollapsefunction.html" class="type SolrCollapseFunction">SolrCollapseFunction</a></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="solrcollapsefunction.tostring.html" class="methodname">__toString</a></span>(): <span class="type">string</span></div>

   }</div>


  </div>
  

  <div class="section" id="solrcollapsefunction.constants">
   <h2 class="title">预定义常量</h2>
   <dl>

    
     <dt id="solrcollapsefunction.constants.nullpolicy-ignore"><strong><code>SolrCollapseFunction::NULLPOLICY_IGNORE</code></strong></dt>

     <dd>

      <p class="para"/>
     </dd>

    

    
     <dt id="solrcollapsefunction.constants.nullpolicy-expand"><strong><code>SolrCollapseFunction::NULLPOLICY_EXPAND</code></strong></dt>

     <dd>

      <p class="para"/>
     </dd>

    

    
     <dt id="solrcollapsefunction.constants.nullpolicy-collapse"><strong><code>SolrCollapseFunction::NULLPOLICY_COLLAPSE</code></strong></dt>

     <dd>

      <p class="para"/>
     </dd>

    

   </dl>

  </div>



 </div>

 



































































































<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="solrcollapsefunction.construct.html">SolrCollapseFunction::__construct</a> — Constructor</li><li><a href="solrcollapsefunction.getfield.html">SolrCollapseFunction::getField</a> — Returns the field that is being collapsed on</li><li><a href="solrcollapsefunction.gethint.html">SolrCollapseFunction::getHint</a> — Returns collapse hint</li><li><a href="solrcollapsefunction.getmax.html">SolrCollapseFunction::getMax</a> — Returns max parameter</li><li><a href="solrcollapsefunction.getmin.html">SolrCollapseFunction::getMin</a> — Returns min parameter</li><li><a href="solrcollapsefunction.getnullpolicy.html">SolrCollapseFunction::getNullPolicy</a> — Returns null policy</li><li><a href="solrcollapsefunction.getsize.html">SolrCollapseFunction::getSize</a> — Returns size parameter</li><li><a href="solrcollapsefunction.setfield.html">SolrCollapseFunction::setField</a> — Sets the field to collapse on</li><li><a href="solrcollapsefunction.sethint.html">SolrCollapseFunction::setHint</a> — Sets collapse hint</li><li><a href="solrcollapsefunction.setmax.html">SolrCollapseFunction::setMax</a> — Selects the group heads by the max value of a numeric field or function query</li><li><a href="solrcollapsefunction.setmin.html">SolrCollapseFunction::setMin</a> — Sets the initial size of the collapse data structures when collapsing on a numeric field only</li><li><a href="solrcollapsefunction.setnullpolicy.html">SolrCollapseFunction::setNullPolicy</a> — Sets the NULL Policy</li><li><a href="solrcollapsefunction.setsize.html">SolrCollapseFunction::setSize</a> — Sets the initial size of the collapse data structures when collapsing on a numeric field only</li><li><a href="solrcollapsefunction.tostring.html">SolrCollapseFunction::__toString</a> — Returns a string representing the constructed collapse function</li></ul>
</div>
</div></div></body></html>